
package org.testis.testdriver;

import java.util.LinkedList;
import java.util.ListIterator;


public class StepIterator implements TestIterator {

    
    private TestPart currentTestPart;
    private  ListIterator listIter;
    private LinkedList<TestPart> refList;

    public StepIterator (StepContainer t) {
        
        refList = t.getTestPartList();
        listIter = refList.listIterator();
        
    }

    public void init () {
        
        listIter = refList.listIterator();        
       
    }

    public void next () {        
        
        currentTestPart =  (TestPart) listIter.next();
    }
    
       public void previous() {
        
        currentTestPart =  (TestPart) listIter.previous();      
        
    }

    public boolean isDone () {
        
        
        return listIter.hasNext();
    }

    public TestPart currentItem () {
        
        return  currentTestPart;
    }

 

    

    
   

}

